<%@page import="by.parfen.game.service.impl.GameServiceImpl"%>
<%@page import="by.parfen.game.datamodel.Player"%>
<%
	String loginPageUrl = "login.jsp";
	String gamePageUrl = "gamesArea.jsp";
	String username = request.getParameter("username");
	
	String redirectPageUrl;
	if (username == null || username.isEmpty()) {
		redirectPageUrl = loginPageUrl;
	} else {
		/*
		GameServiceImpl gameService = new GameServiceImpl();
		Player player = gameService.signUp(username);
		if (player!=null){
			goto the NextPage
		} else {
			back to the LoginPage
		}
		*/
		session.setAttribute("username", username);
		redirectPageUrl = gamePageUrl;
	}
	
	response.sendRedirect(redirectPageUrl);
%>